/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 resurrection_spell.h

	$Header: /heroes4/resurrection_spell.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( RESURRECTION_SPELL_H_INCLUDED )
#define RESURRECTION_SPELL_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "combat_creature_list.h"
#include "combat_creature_ptr.h"
#include "combat_spell_single_target.h"
// -----------------------------------------------------------------------
// handle the resurrection spell
// -----------------------------------------------------------------------

class t_scroll_menu;

class t_resurrection_spell : public t_combat_spell_single_target
{
public:
	t_resurrection_spell( t_battlefield& battlefield, t_spell spell );
	virtual ~t_resurrection_spell();

	virtual double					ai_weight( t_combat_creature const& target) const;
	virtual bool					can_cast( t_screen_point const& point ) const;
	virtual void					cast_and_mirror( t_combat_creature_ptr target, 
		                                            int power );
	virtual double					get_cancel_weight( t_combat_creature const& target ) const;
	virtual t_combat_creature_list	get_targets( t_screen_point const& point ) const;
	virtual t_mouse_window*			mouse_move( t_screen_point const& point,
										       std::string& help_text );
	virtual bool					left_click( t_screen_point const& point );
protected:
	virtual int			get_basic_health_power() const;
	virtual int			get_health_power( t_combat_creature const& target ) const;
	virtual std::string get_text( t_combat_creature* creature );
	virtual void		resurrect( t_combat_creature_ptr creature );

	t_counted_ptr<t_scroll_menu> m_menu;
};

// -----------------------------------------------------------------------
// handler for the Rebirth spell
// -----------------------------------------------------------------------
class t_rebirth_spell : public t_resurrection_spell
{
public:
	t_rebirth_spell( t_battlefield& battlefield, t_spell spell );

	virtual bool begin_casting();
	virtual t_combat_ai_action_list generate_combat_ai_action_list(t_combat_ai &owner);
};

#endif // RESURRECTION_SPELL_H_INCLUDED